#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QThread>
#include <worker.h>

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();
private:
    // 工作类
    Worker *worker;
    // 线程对象
    QThread *t;
private:
    Ui::MainWindow *ui;

    QString m_from;
    QString m_to;

signals:
    void request(char *q, char *m_from, char *m_to);
private slots:
    void on_toBox_currentTextChanged(const QString &arg1);
    void on_fromBox_currentTextChanged(const QString &arg1);
    void on_translation_clicked();
};
#endif // MAINWINDOW_H
